package com.pattern.strategy_pattern;

/**
 * Created by chen on 2018/3/29.
 * <p>
 * Email 122741482@qq.com
 * <p>
 * Describe:
 */
public class Context {
    private Strategy strategy;

    public Context(Strategy strategy) {
        this.strategy = strategy;
    }

    /**
     * 根据strategy的类型 执行 对应的 策略
     * @param a
     * @param b
     */
    public void executeStrategy(int a, int b) {
        strategy.algorithm(a, b);
    }

}
